import request from "@/utils/request";

// 查询供应商列表
export function listSuppliers(query) {
  return request({
    url: "/admin/assets/suppliers/",
    method: "get",
    params: query
  });
}

// 查询供应商详细
export function getSuppliers(id) {
  return request({
    url: "/admin/assets/suppliers/" + id + "/",
    method: "get"
  });
}

// 新增供应商
export function addSuppliers(data) {
  return request({
    url: "/admin/assets/suppliers/",
    method: "post",
    data: data
  });
}

// 修改供应商
export function updateSuppliers(data) {
  return request({
    url: "/admin/assets/suppliers/" + data.id + "/",
    method: "put",
    data: data
  });
}

// 删除供应商
export function delSuppliers(id) {
  return request({
    url: "/admin/assets/suppliers/" + id + "/",
    method: "delete"
  });
}

// 导出供应商
export function exportSuppliers(query) {
  return request({
    url: "/admin/assets/suppliers/export/",
    method: "get",
    params: query
  });
}
export function importsSuppliers(data) {
  return request({
    url: "/admin/assets/suppliers/import/",
    method: "post",
    data: data
  });
}
